<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('aid')->comment('文章主键ID');
            $table->string('title')->comment('文章标题');
            $table->string('description')->comment('文章简介');
            $table->text('content')->comment('正文内容');
            $table->string('poster')->comment('海报');
            $table->string('views')->comment('浏览量');
            $table->string('zan')->comment('点赞数');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('article_models');
    }
}
